<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2"/>
    <g:set var="entityName" value="${message(code: 'productLine.label', default: 'productLine')}"/>
    <title>产品：${this.product.name}</title>
</head>

<body>

<div class="main-body">
    <div class="page-wrapper">
        <!-- Page-header start -->
        <div class="page-header">
            <div class="page-header-title">
                <h4>产品：${this.product.name}</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <g:link action="index" controller="product">产品线列表</g:link>
                    </li>
                    <li class="breadcrumb-item"><a href="#!">产品：${this.product.name}</a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- Page-header end -->
        <!-- Page-body start -->
        <div class="page-body">

            <!-- Hover table card start -->
            <div class="card">
                <div class="card-header">
                    <h5>产品：${this.product.name}</h5>

                    <div class="card-header-right">
                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block">
                    <div class="form-group row">
                        <label class="col-md-1 col-form-label">规格</label>
                        <div class="col-md-2">
                            <span class="cont">${this.product?.specifications}</span>
                        </div>
                        <label class="col-md-1 col-form-label">价格</label>
                        <div class="col-md-2">
                            <span class="cont">${this.product?.price} 元</span>
                        </div>
                        <label class="col-md-1 col-form-label">数量</label>
                        <div class="col-md-2">
                            <span class="cont">${this.product?.amount}</span>
                        </div>
                        <label class="col-md-1 col-form-label">描述</label>
                        <div class="col-md-2">
                            <span class="cont">${this.product?.description}</span>
                        </div>
                    </div>
                </div>
            </div>


            <div class="card">
                <div class="card-header">
                    <h5>附件</h5>

                    <div class="card-header-right">
                        <g:link controller="attachment" action="create" params="[product: this.product?.id]" data-toggle="tooltip" data-placement="top" title="" data-original-title="新增">
                            <i class="icofont icofont-plus"></i>
                        </g:link>
                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>
                <g:render template="/layouts/mashTemplate/attachmentTemplate"/>
            </div>

            <!-- <div class="card">
                <div class="card-header">
                    <h5>产品-阶段</h5>

                    <div class="card-header-right">
                        <sec:ifNotGranted roles="ROLE_COO">
                            <g:link controller="productOpportunityStage" action="create"
                                    params="[product: this.product?.id]" data-toggle="tooltip"
                                    data-placement="top" title="" data-original-title="新增">
                                <i class="icofont icofont-plus"></i></g:link>
                        </sec:ifNotGranted>

                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block dt-responsive">

                    <div class="table-responsive">
                        <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <g:sortableColumn property="code" title="编号"/>
                                        <g:sortableColumn property="stage" title="阶段"/>
                                        <g:sortableColumn property="probability" title="概率"/>
                                        <g:sortableColumn property="component" title="组件"/>
                                        <g:sortableColumn property="log" title="日志"/>
                                        <th width="10%" class="text-center" colspan="2">操作</th>

                                    </tr>
                                    </thead>
                                    <tbody>
                                    <g:each in="${com.next.ProductOpportunityStage.findAllByProduct(this.product)}">
                                        <tr>
                                            <td>
                                                <g:link controller="productOpportunityStage" action="show" id="${it?.id}">${it?.code}</g:link>
                                            </td>
                                            <td>${it?.stage}</td>
                                            <td>${it?.probability}</td>
                                            <td>${it?.component?.name}</td>
                                            <td>${it?.log}</td>
                                            <td class="text-center">
                                                <g:link class="m-r-15 text-primary"
                                                        controller="productOpportunityStage" action="edit"
                                                        id="${it?.id}">
                                                    <i class="icofont icofont-ui-edit"></i>
                                                </g:link>

                                                <g:form controller="productOpportunityStage" action="delete" class="inline" id="${it.id}" method="DELETE">
                                                    <button class="deleteBtn text-danger" type="button">
                                                        <i class="icofont icofont-trash"></i>
                                                    </button>
                                                </g:form>

                                            </td>

                                        </tr>
                                    </g:each>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div> -->


        </div>
    </div>
</div>
</body>
</html>


